package com.usts.edu.studenttemp.controller;


import com.usts.edu.studenttemp.dto.SysUser;
import com.usts.edu.studenttemp.utils.ShiroUtils;

/**
 * Created by Guanzhong Hu
 * Date :2020/5/26
 * Description : 集成父类，用于获取shiro ==> session 中的数据信息 登录者id/整体信息
 * Version :1.0
 */
public abstract class BaseController {

    //获取用户
    protected SysUser getUser(){
        return ShiroUtils.getUserEntity();
    }
    protected Integer getUserId(){
        return getUser().getId();
    }
}
